[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function inkey - get a key
Syntax int inkey(boolean wait);
Prototype in keyboard.h
Remarks inkey returns the key code of the key pressed. If
no key was pressed (WAIT = FALSE) 0 is returned.
This function is similar to getchar() except input
is not echoed to the screen and inkey will detect
any key press (any standard keypress. It cannot
distinguish between the grey '+' key and the white
'+'. This function is interrupt driven. It will
detect ALT combinations, Del, PgUp, function keys,
etc., any keyboard INTerrupt accepted keys.)
Return value returns the key code of the key pressed, from 1 to
511. If WAIT = FALSE, and no key is pressed, zero
is returned.
See also keycode.h
getc_match(), getk(), getc_match(), getlogical(),
getyn(), inkeyc(), inkeycdv(), inkeydv(),
tocapkey()
Example #include <keyboard.h>
#include <stdio.h>
main()
{
int c;
c = inkey(WAIT);
printf("Key code # in keycode.h: %d\n", c);
}
See Also:
getk()
inkeyc()
inkeycdv()
inkeydv()
KeyCodes
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson